package com.qiaofang.applet.constants;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: youqing.yang
 * @Create: 2021/05/14 15:35
 * @Description:
 **/
@Getter
@AllArgsConstructor
public enum EmployeeRolesConstants {

    INPUT_EMPLOYEE("inputEmployeeUuid", "录入人"),
    GUARDIAN_EMPLOYEE("guardianEmployeeUuid","维护人"),
    SURVEY_EMPLOYEE("surveyEmployeeUuid","实勘人"),
    PROMOTION_EMPLOYEE("promotionEmployeeUuid","委托人"),
    ENTRUST_INDEMNITY_EMPLOYEE("entrustIndemnityEmployeeUuid","签赔方"),
    KEY_EMPLOYEE("keyEmployeeUuid","钥匙人"),
    VR_UPLOADER_EMPLOYEE("vrUploaderEmployeeUuid","VR上传人"),
    VIDEO_UPLOADER_EMPLOYEE("videoUploaderEmployeeUuid", "视频上传人");

    private String employeeUuid;

    private String alias;

    public static List<String> getEmployeeUuidList(List<String> aliasList){
       List<String> employeeUuids = new ArrayList<>();
        for (String alias : aliasList) {
            for (EmployeeRolesConstants item : values()) {
                if (StringUtils.equals(item.getAlias(),alias)){
                    employeeUuids.add(item.getEmployeeUuid());
                }
            }
        }
        return employeeUuids;
    }
}
